package customplugin.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.console.IConsoleConstants;


public class Perspective implements IPerspectiveFactory {
	@Override
	public void createInitialLayout(IPageLayout layout) {
	    defineActions(layout);
	    defineLayout(layout);
	}
	
	public void defineActions(IPageLayout layout) {
        // Add "new wizards".
        layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");
        layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");

        // Add "show views".
      //  layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
       // layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
      //  layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
      //  layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
        
	}
	
	public void defineLayout(IPageLayout layout) {
        // Editors are placed for free.
        String editorArea = layout.getEditorArea();

        // Place navigator and outline to left of editor area.
        IFolderLayout left =layout.createFolder("left", IPageLayout.LEFT, (float) 0.22, editorArea);
        left.addView(IPageLayout.ID_PROJECT_EXPLORER);
        left.addView(IPageLayout.ID_OUTLINE);
        
        IFolderLayout right =layout.createFolder("right", IPageLayout.RIGHT, (float) 0.7, editorArea);
        right.addView("plugin.menuMARBLE.Tree");
        //layout.addView("plugin.menuMARBLE.Tree", IPageLayout.BOTTOM, (float) 0.52, "right");
        
        IFolderLayout bottom =layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.52, editorArea);
        //bottom.addView("idBrowser");
		bottom.addView("plugin.asistente.view");
        bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
        bottom.addView(IPageLayout.ID_PROP_SHEET);
        
      
	}


}
